# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=gtkmm4
pkgver=4.14.0
pkgrel=0
pkgdesc="C++ wrappers for GTK 4"
url="https://www.gtkmm.org/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	atkmm2.36-dev
	cairomm1.16-dev
	doxygen
	gdk-pixbuf-dev
	glibmm2.68-dev
	graphviz
	gtk4.0-dev
	m4
	meson
	pangomm2.48-dev
	perl
	"
checkdepends="xvfb-run"
subpackages="$pkgname-devhelp $pkgname-dev $pkgname-doc"
source="https://download.gnome.org/sources/gtkmm/${pkgver%.*}/gtkmm-$pkgver.tar.xz
	setlocale-sigsegv.patch
	"
builddir="$srcdir/gtkmm-$pkgver"

build() {
	abuild-meson \
		-Dbuild-demos=false \
		-Dbuild-tests=true \
		-Dbuild-documentation=true \
		. output
	meson compile -C output
}

check() {
	xvfb-run -a meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
94cf1f764e539b8b1fdff101f6e134c5e2bc9379f1dae3b6daef66ab94e90f5e70a41d8eb94842fd54c0f8706c565e975fa2adf6e4c6913cecaeb3c8cf00a1cd  gtkmm-4.14.0.tar.xz
9ae42182f1b7a8bd21b3e1aaaa830222402a685d4b98c12f2480e724afaa98828e5cade8e8fd79a976c5a110f0ebe19f9703f92dc097a4e9b467b6ec773119bd  setlocale-sigsegv.patch
"
